﻿<!DOCTYPE html>
<html>
<head>
  <title>Minimal GoJS Sample</title>
  <!-- Copyright 1998-2020 by Northwoods Software Corporation. -->
  <meta name="description" content="An almost minimal diagram using a very simple node template and the default link template." />
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <script src="../assets/js/goSamples.js"></script>

  <!-- requires minimalModule.js, built from minimalModule.ts -->
  <script type="module">
    import { init } from "./minimalModule.js";
    // lib needs: export const go = self.go;
    window.onload = function() {
      init();
    }
  </script>

</head>
<body>
<div id="sample">
  <!-- The DIV for the Diagram needs an explicit size or else we won't see anything.
       This also adds a border to help see the edges of the viewport. -->
  <div id="myDiagramDiv" style="border: solid 1px black; width:400px; height:400px"></div>
  <p>
    This sample uses <code>&lt;script type="module"&gt;&lt;/script&gt;</code>
    to import from <code>minimalModule.js</code>, which imports GoJS from <code>go.mjs</code>
  </p>
  <p>
    In some browsers, you may need to serve this file from localhost to allow ES6 imports.
  </p>
  <p>
    There are many more samples using <code>go.mjs</code> in the <code>../extensionsJSM</code> directory.
  </p>
</body>
</html>